inherited sprServicePercent: TsprServicePercent
  Left = 335
  Top = 230
  Caption = #1057#1087#1088#1072#1074#1086#1095#1085#1080#1082' '#1089#1073#1086#1088#1086#1074' '#1079#1072' '#1086#1073#1089#1083#1091#1078#1080#1074#1072#1085#1080#1077
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel2: TPanel
    Top = 25
    Height = 450
    inherited PageControl1: TPageControl
      Height = 450
      inherited tsTab: TTabSheet
        inherited GroupBox3: TGroupBox
          Height = 422
          inherited dbgRefer: TDBGridEh
            Height = 405
            Columns = <
              item
                EditButtons = <>
                FieldName = 'ID'
                Footers = <>
              end
              item
                EditButtons = <>
                FieldName = 'NAME'
                Footers = <>
              end
              item
                EditButtons = <>
                FieldName = 'ORG_ID'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'BDATE'
                Footers = <>
              end
              item
                EditButtons = <>
                FieldName = 'CHARGE_PERCENT'
                Footers = <>
                Width = 69
              end
              item
                EditButtons = <>
                FieldName = 'PAY_PERCENT'
                Footers = <>
                Width = 83
              end
              item
                EditButtons = <>
                FieldName = 'IS_DELETED'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'PAY_PERCENT_SUPP'
                Footers = <>
                Width = 96
              end>
          end
        end
      end
      inherited tsForm: TTabSheet
        inherited GroupBox2: TGroupBox
          Top = 0
          Width = 784
          Height = 422
          Align = alClient
          object Label1: TLabel [0]
            Left = 12
            Top = 30
            Width = 125
            Height = 13
            Alignment = taRightJustify
            AutoSize = False
            Caption = #1054#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103
          end
          object Label2: TLabel [1]
            Left = 12
            Top = 54
            Width = 125
            Height = 13
            Alignment = taRightJustify
            AutoSize = False
            Caption = #1044#1072#1090#1072' '#1085#1072#1095#1072#1083#1072' '#1076#1077#1081#1089#1090#1074#1080#1103
          end
          object Label3: TLabel [2]
            Left = 12
            Top = 78
            Width = 125
            Height = 13
            Alignment = taRightJustify
            AutoSize = False
            Caption = '% '#1089' '#1085#1072#1095#1080#1089#1083#1077#1085#1080#1103
          end
          object Label4: TLabel [3]
            Left = 12
            Top = 102
            Width = 125
            Height = 13
            Alignment = taRightJustify
            AutoSize = False
            Caption = '% '#1089' '#1086#1087#1083#1072#1090#1099' '#1059#1050
          end
          object Label5: TLabel [4]
            Left = 12
            Top = 126
            Width = 125
            Height = 13
            Alignment = taRightJustify
            AutoSize = False
            Caption = '% '#1089' '#1086#1087#1083#1072#1090#1099' '#1087#1086#1089#1090#1072#1074#1097#1080#1082#1091
          end
          inherited pnlButtons: TPanel
            Top = 389
            Width = 780
            inherited SpeedButton1: TSpeedButton
              Left = 581
            end
            inherited SpeedButton2: TSpeedButton
              Left = 683
            end
          end
          object DBLookupComboboxEh1: TDBLookupComboboxEh
            Left = 143
            Top = 28
            Width = 261
            Height = 19
            AlwaysShowBorder = True
            DataField = 'ORG_ID'
            DataSource = dscRefer
            EditButtons = <>
            Flat = True
            KeyField = 'ID'
            ListField = 'SHORTNAME'
            ListSource = dscOrgList
            TabOrder = 1
            Visible = True
          end
          object DBDateTimeEditEh1: TDBDateTimeEditEh
            Left = 143
            Top = 52
            Width = 121
            Height = 19
            AlwaysShowBorder = True
            DataField = 'BDATE'
            DataSource = dscRefer
            EditButtons = <>
            Flat = True
            Kind = dtkDateEh
            TabOrder = 2
            Visible = True
          end
          object DBNumberEditEh1: TDBNumberEditEh
            Left = 143
            Top = 76
            Width = 121
            Height = 19
            AlwaysShowBorder = True
            DataField = 'CHARGE_PERCENT'
            DataSource = dscRefer
            EditButtons = <>
            Flat = True
            TabOrder = 3
            Visible = True
          end
          object DBNumberEditEh2: TDBNumberEditEh
            Left = 143
            Top = 100
            Width = 121
            Height = 19
            AlwaysShowBorder = True
            DataField = 'PAY_PERCENT'
            DataSource = dscRefer
            EditButtons = <>
            Flat = True
            TabOrder = 4
            Visible = True
          end
          object DBNumberEditEh3: TDBNumberEditEh
            Left = 143
            Top = 124
            Width = 121
            Height = 19
            AlwaysShowBorder = True
            DataField = 'PAY_PERCENT_SUPP'
            DataSource = dscRefer
            EditButtons = <>
            Flat = True
            TabOrder = 5
            Visible = True
          end
        end
      end
    end
  end
  inherited GroupBox1: TGroupBox
    Height = 0
    Visible = False
  end
  inherited dsRefer: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE SERVICE_PERCENTS'
      'SET '
      '    BDATE = :BDATE,'
      '    CHARGE_PERCENT = :CHARGE_PERCENT,'
      '    PAY_PERCENT = :PAY_PERCENT,'
      '    PAY_PERCENT_SUPP = PAY_PERCENT_SUPP'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    DeleteSQL.Strings = (
      'UPDATE SERVICE_PERCENTS'
      'SET '
      '    IS_DELETED = 1'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO SERVICE_PERCENTS('
      '    ORG_ID,'
      '    BDATE,'
      '    CHARGE_PERCENT,'
      '    PAY_PERCENT,'
      '    PAY_PERCENT_SUPP,'
      '    IS_DELETED'
      ')'
      'VALUES('
      '    :ORG_ID,'
      '    :BDATE,'
      '    :CHARGE_PERCENT,'
      '    :PAY_PERCENT,'
      '    :PAY_PERCENT_SUPP,'
      '    :IS_DELETED'
      ')'
      'returning id')
    RefreshSQL.Strings = (
      'SELECT'
      '    s.ID,'
      '    s.ORG_ID,'
      '    s.BDATE,'
      '    s.CHARGE_PERCENT,'
      '    s.PAY_PERCENT,'
      '    s.PAY_PERCENT_SUPP,'
      '    s.IS_DELETED,'
      '    u.name'
      'FROM'
      '    SERVICE_PERCENTS s'
      'join userorg u on u.id = s.org_id'
      'where s.is_deleted = 0'
      '  and S.ID = :OLD_ID'
      '     '
      '    ')
    SelectSQL.Strings = (
      'SELECT'
      '    s.ID,'
      '    s.ORG_ID,'
      '    s.BDATE,'
      '    s.CHARGE_PERCENT,'
      '    s.PAY_PERCENT,'
      '    s.PAY_PERCENT_SUPP,'
      '    s.IS_DELETED,'
      '    u.name'
      'FROM'
      '    SERVICE_PERCENTS s'
      'join userorg u on u.id = s.org_id'
      'where s.is_deleted = 0'
      'order by bdate desc, u.name')
    object dsReferID: TFIBIntegerField
      DisplayLabel = #1048#1044
      FieldName = 'ID'
    end
    object dsReferORG_ID: TFIBIntegerField
      FieldName = 'ORG_ID'
    end
    object dsReferBDATE: TFIBDateField
      DisplayLabel = #1044#1072#1090#1072' '#1085#1072#1095#1072#1083#1072
      FieldName = 'BDATE'
    end
    object dsReferCHARGE_PERCENT: TFIBBCDField
      DisplayLabel = '% '#1089' '#1085#1072#1095#1080#1089#1083#1077#1085#1080#1103
      FieldName = 'CHARGE_PERCENT'
      Size = 3
      RoundByScale = True
    end
    object dsReferPAY_PERCENT: TFIBBCDField
      DisplayLabel = '% '#1089' '#1087#1083#1072#1090#1077#1078#1077#1081' '#1059#1050
      FieldName = 'PAY_PERCENT'
      Size = 3
      RoundByScale = True
    end
    object dsReferPAY_PERCENT_SUPP: TFIBBCDField
      DisplayLabel = '% '#1089' '#1087#1083#1072#1090#1077#1078#1077#1081' '#1087#1086#1089#1090#1072#1074#1097#1080#1082#1091
      FieldName = 'PAY_PERCENT_SUPP'
      Size = 3
      RoundByScale = True
    end
    object dsReferIS_DELETED: TFIBSmallIntField
      FieldName = 'IS_DELETED'
    end
    object dsReferNAME: TFIBStringField
      DisplayLabel = #1054#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103
      DisplayWidth = 30
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object dsOrgList: TpFIBDataSet
    SelectSQL.Strings = (
      'SELECT'
      '    ID,'
      '    SHORTNAME,'
      '    NAME'
      'FROM'
      '    USERORG '
      'where id > 0'
      'order by 2')
    AfterCancel = dsReferAfterRefresh
    AfterEdit = dsReferAfterEdit
    AfterInsert = dsReferAfterInsert
    AfterOpen = dsReferAfterRefresh
    AfterRefresh = dsReferAfterRefresh
    Transaction = trLists
    Database = MAINDM.pMainDatabase
    AfterFetchRecord = dsReferAfterFetchRecord
    UpdateTransaction = trRefer
    Left = 340
    Top = 212
    oRefreshAfterPost = False
    oFetchAll = True
    object dsOrgListID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsOrgListSHORTNAME: TFIBStringField
      FieldName = 'SHORTNAME'
      Size = 30
      EmptyStrToNull = True
    end
    object dsOrgListNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object dscOrgList: TDataSource
    DataSet = dsOrgList
    Left = 340
    Top = 260
  end
end
